/*
 * Copyright (c) 2018-2999 九五云信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 */

package com.yami.shop.seckill.comment.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.seckill.comment.dto.SeckillProductSimpleDto;
import com.yami.shop.seckill.comment.model.Seckill;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 秒杀信息
 *
 * @author LGH
 * @date 2019-08-28 09:36:59
 */
public interface SeckillMapper extends BaseMapper<Seckill> {

    IPage<SeckillProductSimpleDto> pageSeckillProd(PageParam<SeckillProductSimpleDto> page, @Param("dbLang") Integer dbLang);

    IPage<Seckill> getPlatformSeckillPage(@Param("page") PageParam<Seckill> page, @Param("seckill") Seckill seckill);

    int updateStatus(@Param("seckillId") Long seckillId, @Param("status") int status);

    void returnStocksByOrderNumber(@Param("orderNumber") String orderNumber);

    void returnStocks(@Param("now") Date now);

    int updateStocksById(@Param("seckillId") Long seckillId, @Param("prodCount") Integer prodCount);

    void changeProdTypeBySeckillIdList(@Param("seckillIds") List<Long> seckillIds);

    void changeSeckillStatusBySeckillIdList(@Param("seckillIds") List<Long> seckillIds);
}
